Skip to content

chore: allow preview environment subject in slack-config STS policy - #80

Merged
sds merged 1 commit into
mainfrom
sts-policy-preview-env
Aug 21, 2026
Merged

chore: allow preview environment subject in slack-config STS policy#80
sds merged 1 commit into
mainfrom
sts-policy-preview-env

Conversation

@sds

@sds sds commented Aug 21, 2026

Copy link
Copy Markdown
Member

Adds repo:tempoxyz@211589300/tip.bot@1232143975:environment:preview to the slack-config trust policy subjects. Jobs that reference a GitHub environment (the preview deploy/destroy/sweep jobs all use environment: preview) present that environment as their OIDC subject instead of the ref/event form, so the existing pull_request and refs/heads/main subjects do not match them — the STS exchange on the #79 preview deploy was denied with "trust policy: subject did not match".

@sds
sds enabled auto-merge (squash) August 21, 2026 06:23
@sds
sds merged commit 9a5573e into main Aug 21, 2026
8 checks passed
@sds
sds deleted the sts-policy-preview-env branch August 21, 2026 06:24
@sds
sds deployed to preview August 21, 2026 06:24 — with GitHub Actions Active
sds added a commit that referenced this pull request Aug 21, 2026
#81)

Adds `repo:tempoxyz@211589300/tip.bot@1232143975:environment:production`
to the `slack-config` trust policy, the production counterpart to #80:
the `update_slack_app` job runs in `environment: production`, so its
OIDC subject is the environment form and the existing `refs/heads/main`
subject does not match it. Without this, the production Slack app update
would fail to mint once #79 lands.

Also rewrites the subject comment to reflect that all rotating jobs run
in environments; the ref/event subjects remain for any future job that
rotates without one.
sds added a commit that referenced this pull request Aug 21, 2026
Removes the `ref:refs/heads/main` and `pull_request` subjects from the
`slack-config` trust policy. Every job that rotates the Slack config
token runs in a GitHub environment, so those subjects match nothing
today — jobs with an `environment:` key always present the
environment-form OIDC subject (#80, #81).

Dropping them also tightens the grant: with `pull_request` present, any
same-repo PR workflow job without an environment could mint a `secrets:
write` token; now minting requires entering the `preview` or
`production` environment, so any deployment protection rules on those
environments gate token minting too. A future environment-less job that
needs to rotate can add its subject back in a reviewed diff.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant